<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
            <title>测试</title>
            <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
            <meta http-equiv="Pragma" content="no-cache" />
            <meta http-equiv="Expires" content="0" />
            <meta name="description" content="">
                <meta name="keywords" content="">
                    <meta name="apple-mobile-web-app-capable" content="yes" />
                    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
                    <meta name="format-detection" content="telephone=no" />
                    <meta name="format-detection" content="email=no" />
                    <meta name="viewport"
                    content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0" />
                    <script src="js/jquery.min.js"></script>
                    <script>
                        alert('测试页面');
                        // 固定写法 函数名字可变
                        function setupWebViewJavascriptBridge(callback) {
                            if (window.WebViewJavascriptBridge) {
                                callback(WebViewJavascriptBridge)
                            } else {
                                document.addEventListener('WebViewJavascriptBridgeReady' , function() {
                                                          callback(WebViewJavascriptBridge)
                                                          }, false );
                            }

                            // =====以下是iOS必须的特殊处理========
                            if (window.WVJBCallbacks) { return window.WVJBCallbacks.push(callback); }
                            window.WVJBCallbacks = [callback];
                            var WVJBIframe = document.createElement('iframe');
                            WVJBIframe.style.display = 'none';
                            WVJBIframe.src = 'wvjbscheme://__BRIDGE_LOADED__';
                            document.documentElement.appendChild(WVJBIframe);
                            setTimeout(function() { document.documentElement.removeChild(WVJBIframe) }, 0);
                            // =====以上是iOS必须的特殊处理========
                        }

                        // 固定写法2 函数名字与1保持一致
                        setupWebViewJavascriptBridge(function(bridge) {
                            // Java 注册回调函数，第一次连接时调用 初始化函数
                             bridge.init();
                        });

                        // 每个方法的特殊处理
                        function setTitle() {
                          WebViewJavascriptBridge.callHandler('_app_setTitle',
                          '这是一个nav标题',
                          function (response) {
                            // 移动端回传的数据
                            alert('移动端回传的数据:' + response);
                          });
                        }
                    
                    </script>

                    <style>
                        html {
                            font-family: Helvetica;
                            color: red;
                        }

                    h1 {
                        color: steelblue;
                        font-size: 24px;
                        margin-top: 24px;
                    }

                    button {
                        margin: 0 3px 10px;
                        font-size: 12px;
                    }

                    .logLine {
                        border-bottom: 1px solid #ccc;
                        padding: 4px 2px;
                        font-family: courier;
                        font-size: 11px;
                    }

                    input {
                        height: 32px;
                        margin: 30px;
                    }
                    </style>
    </head>
    <body>

        <div id='buttons'></div>
        <div id='log'></div>
        <div class="pointexchange">
            <div>
                <img src="points4.png" width="47px" height="47px" title="points4.png" /><br />
                <label>积分兑换实物</label>
            </div>
            <div>
                <img src="points1.png" width="47px" height="47px" title="points1.png" /><br />
                <label>积分兑换红包</label>
            </div>
            <div>
                <img src="points2.png" width="47px" height="47px" title="points2.png" /><br />
                <label>积分参与活动</label>
            </div>
        </div>
        <br />
        <input id="test" type="button" onclick="setTitle()" value="设置标题" />
        <br />
        <br />
        <a href="tel:13112345678">移动WEB页面JS一键拨打号码咨询功能</a>
        <br />
    </body>
</html>
